package com.hadwinling.blog.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.hadwinling.blog.entity.Photo;
import com.hadwinling.blog.mapper.PhotoMapper;
import com.hadwinling.blog.service.PhotoService;

import java.util.List;

/**
 * @author HadwinLing
 * @version V1.0
 * @Package com.hadwinling.blog.service.impl
 * @date 2020/8/19 7:47
 */
@Service
public class PhotoServiceImpl implements PhotoService {

    @Resource
    private PhotoMapper photoMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return photoMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Photo record) {
        return photoMapper.insert(record);
    }

    @Override
    public int insertSelective(Photo record) {
        return photoMapper.insertSelective(record);
    }

    @Override
    public Photo selectByPrimaryKey(Integer id) {
        return photoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Photo> selectAllByState(Integer state) {
        return photoMapper.selectAllByState(state);
    }

    @Override
    public int updateByPrimaryKeySelective(Photo record) {
        return photoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Photo record) {
        return photoMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Photo> selectAllByAdminid(Integer adminid) {
        return photoMapper.selectAllByAdminid(adminid);
    }

    @Override
    public List<Photo> selectAllByAdminidAndState(Integer adminid, Integer state) {
        return photoMapper.selectAllByAdminidAndState(adminid, state);
    }

}




